Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test case for publishing and claiming private account capability #2195

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

turbolent
Copy link
Member

Work towards #2151

Description

As noted in the FLIP, ensure that AuthAccount capabilities also work with the new publish/claim capability API.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@turbolent turbolent requested a review from a team December 13, 2022 23:48
@turbolent turbolent self-assigned this Dec 13, 2022
@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

Merging #2195 (3ea4420) into master (a3d496a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2195   +/-   ##
=======================================
  Coverage   77.58%   77.58%           
=======================================
  Files         309      309           
  Lines       65406    65406           
=======================================
  Hits        50747    50747           
  Misses      12880    12880           
  Partials     1779     1779           
Flag Coverage Δ
unittests 77.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit a3d496a
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -benchmem -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Collapsed results for better readability

old.txtnew.txt
time/opdelta
CheckContractInterfaceFungibleTokenConformance-2110µs ± 1%109µs ± 1%~(p=0.138 n=7+6)
ContractInterfaceFungibleToken-237.6µs ± 1%37.6µs ± 1%~(p=0.710 n=7+7)
InterpretRecursionFib-22.49ms ± 2%2.45ms ± 0%−1.32%(p=0.014 n=7+6)
NewInterpreter/new_interpreter-21.08µs ± 1%1.08µs ± 1%~(p=0.245 n=7+7)
NewInterpreter/new_sub-interpreter-2598ns ± 7%596ns ± 5%~(p=0.805 n=7+7)
ParseArray-27.61ms ± 2%7.76ms ± 7%~(p=0.456 n=7+7)
ParseDeploy/byte_array-211.6ms ± 6%11.7ms ± 6%~(p=0.620 n=7+7)
ParseDeploy/decode_hex-21.21ms ± 1%1.21ms ± 1%~(p=0.818 n=6+6)
ParseFungibleToken/With_memory_metering-2183µs ± 0%184µs ± 1%~(p=0.366 n=6+7)
ParseFungibleToken/Without_memory_metering-2144µs ± 2%143µs ± 0%~(p=0.073 n=6+7)
ParseInfix-27.06µs ± 1%7.00µs ± 1%−0.95%(p=0.020 n=7+6)
QualifiedIdentifierCreation/One_level-22.41ns ± 0%2.41ns ± 0%~(p=0.805 n=6+7)
QualifiedIdentifierCreation/Three_levels-2116ns ± 3%116ns ± 2%~(p=0.646 n=7+7)
RuntimeFungibleTokenTransfer-2534µs ±25%449µs ± 1%−15.89%(p=0.022 n=7+6)
RuntimeResourceDictionaryValues-25.12ms ± 1%5.10ms ± 1%~(p=0.589 n=6+6)
RuntimeScriptNoop-217.1µs ±30%13.4µs ± 6%~(p=0.138 n=7+6)
SuperTypeInference/arrays-2283ns ± 0%287ns ± 5%~(p=0.805 n=7+7)
SuperTypeInference/composites-2130ns ± 0%130ns ± 0%~(p=0.181 n=7+7)
SuperTypeInference/integers-290.9ns ± 1%90.5ns ± 0%~(p=0.244 n=7+6)
ValueIsSubtypeOfSemaType-287.5ns ± 3%87.2ns ± 1%~(p=0.937 n=6+6)
 
alloc/opdelta
CheckContractInterfaceFungibleTokenConformance-248.7kB ± 0%48.7kB ± 0%~(p=0.192 n=7+7)
ContractInterfaceFungibleToken-222.9kB ± 0%22.9kB ± 0%~(all equal)
InterpretRecursionFib-21.00MB ± 0%1.00MB ± 0%~(p=1.000 n=6+6)
NewInterpreter/new_interpreter-2768B ± 0%768B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-2200B ± 0%200B ± 0%~(all equal)
ParseArray-22.69MB ± 2%2.70MB ± 2%~(p=0.731 n=7+6)
ParseDeploy/byte_array-24.14MB ± 3%4.09MB ± 0%~(p=0.464 n=7+6)
ParseDeploy/decode_hex-2214kB ± 0%214kB ± 0%~(p=0.600 n=7+7)
ParseFungibleToken/With_memory_metering-229.2kB ± 0%29.2kB ± 0%~(p=0.098 n=6+7)
ParseFungibleToken/Without_memory_metering-229.2kB ± 0%29.2kB ± 0%~(p=0.761 n=7+7)
ParseInfix-21.92kB ± 0%1.92kB ± 0%~(p=0.380 n=7+7)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
RuntimeFungibleTokenTransfer-2101kB ± 1%101kB ± 0%−0.57%(p=0.031 n=7+6)
RuntimeResourceDictionaryValues-22.28MB ± 0%2.29MB ± 0%+0.24%(p=0.014 n=6+7)
RuntimeScriptNoop-26.78kB ± 0%6.77kB ± 0%~(p=0.328 n=7+7)
SuperTypeInference/arrays-296.0B ± 0%96.0B ± 0%~(all equal)
SuperTypeInference/composites-20.00B 0.00B ~(all equal)
SuperTypeInference/integers-20.00B 0.00B ~(all equal)
ValueIsSubtypeOfSemaType-248.0B ± 0%48.0B ± 0%~(all equal)
 
allocs/opdelta
CheckContractInterfaceFungibleTokenConformance-2794 ± 0%794 ± 0%~(all equal)
ContractInterfaceFungibleToken-2363 ± 0%363 ± 0%~(all equal)
InterpretRecursionFib-218.9k ± 0%18.9k ± 0%~(all equal)
NewInterpreter/new_interpreter-213.0 ± 0%13.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-24.00 ± 0%4.00 ± 0%~(all equal)
ParseArray-259.6k ± 0%59.6k ± 0%~(p=1.000 n=7+7)
ParseDeploy/byte_array-289.4k ± 0%89.4k ± 0%~(p=0.674 n=7+7)
ParseDeploy/decode_hex-264.0 ± 0%64.0 ± 0%~(all equal)
ParseFungibleToken/With_memory_metering-2779 ± 0%779 ± 0%~(all equal)
ParseFungibleToken/Without_memory_metering-2779 ± 0%779 ± 0%~(all equal)
ParseInfix-248.0 ± 0%48.0 ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
RuntimeFungibleTokenTransfer-21.96k ± 0%1.96k ± 0%~(p=1.000 n=7+7)
RuntimeResourceDictionaryValues-236.9k ± 0%36.9k ± 0%~(p=0.359 n=7+6)
RuntimeScriptNoop-298.0 ± 0%98.0 ± 0%~(all equal)
SuperTypeInference/arrays-23.00 ± 0%3.00 ± 0%~(all equal)
SuperTypeInference/composites-20.00 0.00 ~(all equal)
SuperTypeInference/integers-20.00 0.00 ~(all equal)
ValueIsSubtypeOfSemaType-21.00 ± 0%1.00 ± 0%~(all equal)
 

@turbolent
Copy link
Member Author

@SupunS could you please have a look?

@turbolent turbolent merged commit ed1c493 into master Dec 21, 2022
@turbolent turbolent deleted the bastian/test-publish-claim-account-cap branch December 21, 2022 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants